#!/bin/bash

# IPs
IP="10.74.57.4"
BROADCAST="10.74.57.255"

# DIRECCIONES DE RED
acaraguay="10.31.17.0"
chirimay="10.31.17.128"
uruguari="10.31.17.64"
iguazu="10.97.5.0"
nogoya="10.74.63.244"

# DIRECCIONES DE GATEWAYS
H116="10.74.57.1"
H124="10.74.57.3"

# MASCARAS DE RED
Netmask24="255.255.255.0"
Netmask25="255.255.255.128"
Netmask26="255.255.255.192"
Netmask27="255.255.255.224"
Netmask28="255.255.255.240"
Netmask29="255.255.255.248"
Netmask30="255.255.255.252"

./limpiezaInterfaces.sh
interfaz=`ifconfig | egrep "eth." -o | head -1`

ifconfig $interfaz $IP broadcast $BROADCAST netmask $Netmask24 

route add -net $acaraguay netmask $Netmask26 dev $interfaz gw $H116
route add -net $chirimay netmask $Netmask25 dev $interfaz gw $H116 
route add -net $uruguari netmask $Netmask27 dev $interfaz gw $H116 
route add -net $iguazu netmask $Netmask24 dev $interfaz gw $H116 
route add -net $nogoya netmask $Netmask30 dev $interfaz gw $H116 
route add -net 0.0.0.0 netmask 0.0.0.0 dev $interfaz gw $H124


#	./DNSresto.sh
